package com.cloudkinto.vo.order.outbound;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author long
 */
@Data
public class WaveSecondarySortingDetail {

    @ApiModelProperty("波次号")
    private String waveNo;

    @ApiModelProperty("订单已分拣")
    private int sortedOrder = 0;

    @ApiModelProperty("订单总分拣")
    private int orderTotal;

    @ApiModelProperty("产品已分拣")
    private Integer sortedProduct;

    @ApiModelProperty("产品总分拣")
    private Integer productTotal;

    @ApiModelProperty("网格行")
    private Integer gridRow;

    @ApiModelProperty("网格列")
    private Integer gridCol;

    @ApiModelProperty("格子数据列表")
    private List<WaveSecondarySortingDetail.GridItem> gridItemList;

    @Data
    public static class GridItem {

        @ApiModelProperty("格子号")
        private Integer gridNo;

        private Long outboundId;

        @ApiModelProperty("出库单号")
        private String outboundNo;

        @ApiModelProperty("是否已出库")
        private boolean outboundFlag;

        @ApiModelProperty("已分拣")
        private Integer secondarySortingQty;

        @ApiModelProperty("总量")
        private Integer outboundQty;

        @ApiModelProperty("产品列表")
        private List<WaveSecondarySortingDetail.GridItemDetail> skuList;

        @ApiModelProperty("包裹信息")
        private List<OutboundPackageDetail> outboundPackageList = new ArrayList<>();
    }

    @Data
    public static class GridItemDetail {

        private Long productId;

        @ApiModelProperty("sku")
        private String sku;

        @ApiModelProperty("产品条码")
        private String mainBarcode;

        @ApiModelProperty("产品名称")
        private String productName;

        @ApiModelProperty("是否需要包材")
        private Boolean needPack;

        @ApiModelProperty("推荐包材编码")
        private String recommendPackCode;

        @ApiModelProperty("推荐包材名称")
        private String recommendPackName;

        @ApiModelProperty("已分拣")
        private Integer secondarySortingQty;

        @ApiModelProperty("总量")
        private Integer outboundQty;
    }
}
